package com.example.designer.observer;

import com.example.designer.observer.impl.CurrentConditionDisplay;
import com.example.designer.observer.impl.WeatherData;

public class Test {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();//创建主题
        CurrentConditionDisplay current = new CurrentConditionDisplay(weatherData);//创建观察者并注册到主题

        //修改主题数据
        weatherData.setMeasureMent(1.0f,2.0f,3.3f);
        weatherData.remoteObserver(current);
        weatherData.setMeasureMent(1.0f,2.0f,3.3f);
    }
}
